//
//  UIWindow+Extension.m
//  WeiBo17
//
//  Created by teacher on 15/8/19.
//  Copyright (c) 2015年 itcast. All rights reserved.
//

#import "UIWindow+Extension.h"
#import "IWAccount.h"
#import "IWAccountTool.h"
#import "IWTabBarController.h"
#import "IWOAuthViewCtrl.h"

@implementation UIWindow (Extension)


- (void)swithRootViewCtrl{
    //判断是否有登录过
    IWAccount* accont = [IWAccountTool account];
    
    if (accont) {
        //代表已经登录过
        self.rootViewController = [IWTabBarController new];
    }else {
        //进入登录界面
        self.rootViewController = [IWOAuthViewCtrl new];
    }
}

@end
